{{useCss "/app-pages/css/pc/main/article.scss"}}
<div class="pagetitle">文章内容编辑</div>
<div class="box">
    <div class="authorinfo">
        <!-- 作者、时间、板块、标题、来源、展示封面 -->
        <div class="line">
            <input type="text" placeholder="文章标题" class="title" bind-input="{{'$Cache.main.article.article.title'}}" bind-value="{{$Cache.main.article.article.title}}" />
        </div>
        <div class="line">
            <div class="item">
                作者：
                <input type="text" class="input" placeholder="文章作者" bind-input="{{'$Cache.main.article.article.author'}}" bind-value="{{$Cache.main.article.article.author}}" />
            </div>
            <div class="item">
                板块：
                <select class="input" bind-input="{{'$Cache.main.article.article.section'}}" bind-value="{{$Cache.main.article.article.section}}" event-change="{{'$Event.main.article.modulechange'}}">
                    <option value="none">--请选择文章板块--</option>
                    {{#each $Cache.main.article.section_list}}
                    <option value="_id">{{name}}</option>
                    {{/each}}
                    <option value="addmodule">+新增板块</option>
                </select>
            </div>
        </div>
        <div class="line">
            <div class="viewport">
                <button disabled="{{$Cache.main.article.viewport.isadding}}" onclick="javascript:document.getElementById('viewport').click()">{{$Cache.main.article.viewport.isadding?"正在上传":($Cache.main.article.article.imgurl?"修改展示封面（点击图片可删除）":"添加展示封面")}}</button>
                <input type="file" accept="image/*" style="display:none" id="viewport"  event-change="{{'$Event.main.article.addViewPort'}}" />
                <div class="viewportimg">
                  {{#if $Cache.main.article.article.imgurl}}
                  <img src="{{$Cache.main.article.article.imgurl}}" event-click="{{'$Event.main.article.delete_viewport'}}" title="删除图片" />
                  {{/if}}
                </div>
            </div>
        </div>
    </div>
    <textarea name="ckeditor" class="ckeditor"></textarea>
    <div class="line">
        <button event-click="{{'$Event.main.article.addarticle'}}">发布</button>
    </div>
</div>
<div class="newmodulebox {{$Cahce.main.article.openaddmodule&&'focus'}}">
    <div class="infobox">
        <div class="item">
            新板块名称：
            <input type="text" class="name" placeholder="新增板块名称" bind-input="{{'$Cache.main.article.newmodule.name'}}" bind-value="{{$Cache.main.article.newmodule.name}}"/>
        </div>
        <div class="item">
            <button event-click="{{'$Event.main.article.createmodule'}}">+新增板块</button>
            <button event-click="{{'$Event.main.article.canceladdmodule'}}">取消</button>
        </div>
    </div>
</div>
